<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
    <link rel="stylesheet" href="../../CSS/bootstrap.min.css"/>
    <link rel="stylesheet" href="../../CSS/search.css"/>
</head>
<body>
    <h1>展示商品</h1>
    <div id="all">
      <c:forEach var="product" items="${searchList}">
        <div class="card">
          <div id="card-in">
            <div class="grid-area grid-area_a grid-thumbnail">
              <div class="card-thumbnail">
                <img src="../../images/${product.image}" alt="">
              </div>
            </div>
            <div class="grid-area grid-area_b">
              <h3 class="card-title">${product.productName}</h3>
              <div class="card-submit">${product.description}</div>
            </div>
            <div class="grid-area grid-area_c">
              <div class="card-label">
                <span>爆款促销</span>
                <span>金币抵2%</span>
              </div>
            </div>
            <div class="grid-area grid-area_d">
              <div class="card-price">${product.price}￥</div>
              <div class="card-action">
                <button>立即购买</button>
              </div>
            </div>
          </div>
        </div>
      </c:forEach>
      <%--查不到商品警告--%>
      <span style="color:red;font-weight: bold;line-height: 100px;">${err}</span>
    </div>

    <%--分页--%>
    <nav aria-label="Page navigation">
      <ul class="pagination">
        <li>
          <a href="#" aria-label="Previous">
            <span aria-hidden="true">&laquo;</span>
          </a>
        </li>
        <li><a href="#">1</a></li>
        <li><a href="#">2</a></li>
        <li><a href="#">3</a></li>
        <li><a href="#">4</a></li>
        <li><a href="#">5</a></li>
        <li>
          <a href="#" aria-label="Next">
            <span aria-hidden="true">&raquo;</span>
          </a>
        </li>
      </ul>
    </nav>
</body>
</html>
